<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改过滤约束')" />
	<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-filter-edit" th:object="${filter}">
            <input id="filterId" name="id" th:field="*{id}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-2 control-label">约束名称：</label>
                <div class="col-sm-10">
                    <input id="filterName" name="filterName" th:field="*{filterName}" class="form-control" type="text" required="required">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-2 control-label">约束表达式：</label>
                <div class="col-sm-10">
                    <input id="filterKey" name="filterKey" th:field="*{filterKey}" class="form-control" type="text" required="required">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-2 control-label">约束方法值：</label>
                <div class="col-sm-10">
                    <input id="filterValue" name="filterValue" th:field="*{filterValue}" class="form-control" type="text" required="required">
                </div>
            </div>
            <div class="form-group">
				<label class="col-sm-2 control-label">约束状态：</label>
				<div class="col-sm-10">
					<div class="radio-box" th:each="dict : ${@dict.getDict('sys_data_status')}">
						<input type="radio" th:id="${dict.id}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
						<label th:for="${dict.id}" th:text="${dict.dictName}"></label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">显示顺序：</label>
				<div class="col-sm-10">
					<input class="form-control" type="number" name="orderNum" required="required" th:field="*{orderNum}">
				</div>
			</div>
			<div class="form-group">
                <label class="col-xs-2 control-label">备注：</label>
                <div class="col-xs-10">
                    <textarea name="remark" maxlength="500" class="form-control" rows="3">[[*{remark}]]</textarea>
                </div>
            </div>
		</form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/filter";
    
		function submitHandler() {
	        if ($.validate.form()) {
				$.operate.save(prefix + "/edit", $('#form-filter-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
